<template>
  <a-modal
    v-model:visible="visible"
    title="Custom Modal"
    @cancel="showModal(false)"
  >
    <p>Some contents...</p>
    <template #footer>
      <a-button @click="showModal(false)">关闭</a-button>
    </template>
  </a-modal>
</template>

<script setup lang="ts">
import { ref, defineExpose } from 'vue';
const visible = ref<Boolean>(false);
const showModal = (bool: Boolean):void => {
  visible.value = bool;
}

defineExpose({
    showModal
  });
</script>

<style></style>